home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10346 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: fflush and Visual C++
  5. Date: 16 Mar 1996 20:55:11 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4ifuuf$fha@solutions.solon.com>
  8. References: <4idhv5$dnv@news.mhv.net> <314b173b.71056173@nntp.ix.netcom.com>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <314b173b.71056173@nntp.ix.netcom.com>,
  12. Mike Rubenstein <miker3@ix.netcom.com> wrote:
  13. >Perhaps because Visual C implements fflush() correctly.  fflush() does
  14. >not flush input buffers.  fflush() with stdin as an argument results
  15. >in undefined behavior.
  16.  
  17. The first part of this is incorrect.  fflush() may flush input buffers.
  18. It may cause the program to abort.  It may do nothing.  But there's
  19. nothing *wrong* with it choosing to discard pending input when invoked
  20. on an input stream.  Except that it's rude of an implementation to offer
  21. a silent extension, it causes people to make mistakes.
  22.  
  23. -s
  24. -- 
  25. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  26. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  27. FUCK the communications decency act.  Goddamned government.  [literally.]
  28. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  29.